const express = require('express');
const path = require('path');

const app = express();

const bodyPaser = require('body-parser')

require('./model/connect');
// require('./model/user');
// //require会在导入时同时执行这个文件

const home =require('./route/home');
const admin =require('./route/admin');


app.set('views',path.join(__dirname,'views'));
app.set('view engine','art');
app.engine('art',require('express-art-template'));

app.use(express.static(path.join(__dirname,'public')));

app.use('/home', home);
app.use('/admin', admin);

app.listen(3000);
console.log('网站服务器启动，请访问localhost')